package com.ruoyi.movie.service.impl;

import com.ruoyi.movie.domain.Profession;
import com.ruoyi.movie.mapper.ProfessionMapper;
import com.ruoyi.movie.service.IProfessionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * 职业Service业务层处理
 *
 * @author ruoyi
 * @date 2025-01-22
 */
@Service
public class ProfessionServiceImpl implements IProfessionService {

    @Autowired
    private ProfessionMapper professionMapper;

    /**
     * 查询职业
     *
     * @param id 职业主键
     * @return 职业
     */
    @Override
    public Profession selectProfessionById(Long id) {
        return professionMapper.selectProfessionById(id);
    }

    /**
     * 查询职业列表
     *
     * @param profession 职业
     * @return 职业集合
     */
    @Override
    public List<Profession> selectProfessionList(Profession profession) {
        return professionMapper.selectProfessionList(profession);
    }

    /**
     * 新增职业
     *
     * @param profession 职业
     * @return 结果
     */
    @Override
    public int insertProfession(Profession profession) {
        return professionMapper.insertProfession(profession);
    }

    /**
     * 修改职业
     *
     * @param profession 职业
     * @return 结果
     */
    @Override
    public int updateProfession(Profession profession) {
        return professionMapper.updateProfession(profession);
    }

    /**
     * 批量删除职业
     *
     * @param ids 需要删除的职业主键集合
     * @return 结果
     */
    @Override
    public int deleteProfessionByIds(Long[] ids) {
        return professionMapper.deleteProfessionByIds(ids);
    }

    /**
     * 删除职业信息
     *
     * @param id 职业主键
     * @return 结果
     */
    @Override
    public int deleteProfessionById(Long id) {
        return professionMapper.deleteProfessionById(id);
    }
}